home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / rus / uni.sty < prev    next >
Text File  |  1992-08-12  |  52KB  |  1,385 lines

  1.  
  2. %  ********************************************
  3. %  * Universtity of Stuttgart Universal Style *
  4. %  ********************************************
  5. %  *            USUS DOCUMENT STYLE           *
  6. %  *      R.Harscheidt, IKE/UNI Stuttgart     *
  7. %  ********************************************
  8. %
  9. %  All macros like in the usplain format. This
  10. %  file can also be used to make this format
  11. %  by INITEX. In the loading INITEX-file the
  12. %  definition "\def\initex{INITEX}" should be
  13. %  included.
  14. %
  15. \makeatletter   % make at a letter
  16.  
  17. %  ****************************************
  18. %  *                BANNER                *
  19. %  ****************************************
  20. %
  21. \def\@usname    {USUS - University of Stuttgart Universal Style }
  22. \def\@usdate    {14. July 1988}
  23. \def\@usversion {RUS1.0}
  24. \everyjob{\typeout{\@usname \@usversion\space- Released \@usdate}}
  25. \immediate\write10{\@usname \@usversion\space- Released \@usdate}
  26.  
  27. %%%%% The following comes from usgerman.sty %%%%%%%%%%%%
  28.  
  29. %  *****************************************
  30. %  *                HEADERS                *
  31. %  *****************************************
  32. %
  33. \gdef\@headabstract {\"Ubersicht}
  34. \gdef\@headpreface  {Vorwort}
  35. \gdef\@headappendix {Anhang}
  36. \gdef\@headpart     {Teil}
  37. \gdef\@headchapter  {}
  38. \gdef\@headtoc      {Inhalt}
  39. \gdef\@headloa      {Abk\"urzungen}
  40. \gdef\@headlof      {Abbildungen}
  41. \gdef\@headlos      {Formelzeichen}
  42. \gdef\@headlot      {Tabellen}
  43. \gdef\@headglo      {Erkl\"arungen}
  44. \gdef\@headidx      {Index}
  45. \gdef\@headbib      {Literatur}
  46.  
  47. %  *****************************************
  48. %  *                CAPTIONS               *
  49. %  *****************************************
  50. %
  51. \gdef\@capfigure    {Abbildung}
  52. \gdef\@captable     {Tabelle}
  53.  
  54. %  *****************************************
  55. %  *                  DATE                 *
  56. %  *****************************************
  57. %
  58. \gdef\monthname{
  59.      \ifcase\month\or
  60.         Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or
  61.         Juli\or August\or September\or Oktober\or November\or Dezember
  62.      \fi}
  63. \gdef\thismonth{\monthname\space\number\year}
  64. \gdef\today{\number\day.\thismonth}
  65.  
  66. %%%%% Here the original ususall.sty goes on %%%%%%%%%
  67.  
  68.  
  69. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  70. % This was made from:
  71. %
  72. % BOOK DOCUMENT STYLE -- Released 23 September 1985
  73. %    for LaTeX version 2.09
  74. % Copyright (C) 1985 by Leslie Lamport
  75. %
  76. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  77.  
  78. %  ****************************************
  79. %  *          TWO-COLUMN OPTION           *
  80. %  ****************************************
  81. %
  82. % \@twocolumnfalse              % Default is one column.
  83. \def\ds@twocolumn{              % Defines two column option.
  84.     \@twocolumntrue}
  85.  
  86. %  ****************************************
  87. %  *           TWO-SIDE OPTION            *
  88. %  ****************************************
  89. %
  90. % \twosidefalse                 % Default is single sided.
  91. \def\ds@twoside{                % Defines twoside option.
  92.     \@twosidetrue
  93.     \@mparswitchtrue}           % Marginpars go on outside of page.
  94.  
  95. %  ****************************************
  96. %  *             DRAFT OPTION             *
  97. %  ****************************************
  98. %
  99. % \overfullrule = 0em           % Default is don't mark overfull hboxes.
  100. \def\ds@draft{                  % Causes overfull hboxes to be marked.
  101.     \overfullrule .5em}
  102.  
  103. %  ****************************************
  104. %  *                FONTS                 *
  105. %  ****************************************
  106. %
  107. \lineskip       .1em      % \lineskip is 0.1em for all font sizes.
  108. \normallineskip .1em
  109. \def\baselinestretch{1}   % 1=1-zeilig, 1.33=1.5-zeilig, 1.66=2-zeilig
  110.  
  111. %  The font size option is handled by reading a different file for each
  112. %  size, as follows, to define font size-specific commands:
  113. %       10pt : US10, 11pt : US11, 12pt : US12
  114. %  Implemented by \def'ing \@fontload to the nesessary input command.
  115. %
  116. %  in 10pt type size : 1em = 10pt
  117. %  in 11pt type size : 1em = 11pt
  118. %  in 12pt type size : 1em = 12pt
  119. %
  120. \def\definefont#1{%
  121.     \def\@ptsize{#1}                    % define ptsize used by some macros
  122.     \def\@fontload{%
  123.         \input us1\@ptsize.sty          % input fontfile
  124.         \let\@fontload\relax}}          % load only once
  125.  
  126. \definefont{2}                          % 12pt is default
  127. \@namedef{ds@12pt}{}                    % 12pt option does nothing
  128. \@namedef{ds@11pt}{\definefont{1}}      % 11pt option loads us11.sty
  129. \@namedef{ds@10pt}{\definefont{0}}      % 10pt option loads us10.sty
  130.  
  131. % The sans serif option must be set before the optionfiles are loaded. Some of
  132. % these files use the \@fontstyle.
  133. %
  134. \def\@fontstyle{}                       % default is roman
  135. \@namedef{ds@sf}{\let\@fontstyle\sf}    % sf option  sans serif
  136.  
  137. %  ****************************************
  138. %  *            LOAD OPTIONFILES          *
  139. %  ****************************************
  140. %
  141. % The \@options command causes the execution of every command \ds@FOO
  142. % which is defined and for which the user typed the FOO option in his
  143. % \documentstyle command.  For every option BAR he typed for which
  144. % \ds@BAR is not defined, the file BAR.sty will be read after the present
  145. % (main) .STY file is executed.
  146. %
  147. \def\@options{\let\@elt\relax
  148.     \@for\@tempa:=\@optionlist\do
  149.         {\@ifundefined{ds@\@tempa}                          % option command ?
  150.              {\xdef\@optionfiles{\@optionfiles              % load option file
  151.               \catcode`@=11\@elt\@tempa.sty\relax}}
  152.              {\csname ds@\@tempa\endcsname}}}               % execute command
  153.  
  154. \ifx \initex \undefined                 % do not load option- and fontfiles
  155.      \@options                          % when this is used to make a format.
  156.      \relax                             % that must then be done by 'usus.sty'
  157. \fi
  158.  
  159. \@fontload                              % load default fontsize
  160. %\input logos.sty                        % logo makros
  161. %\input quotes.sty                       % quote makros
  162. %
  163. %  ****************************************
  164. %  *            PAGE LAYOUT               *
  165. %  ****************************************
  166. %
  167. % All margin dimensions measured from a point one inch from top and side
  168. % of page.
  169. % SIDE MARGINS:
  170. %
  171. \if@twoside
  172.    \oddsidemargin     5mm % rh  % Left margin on odd-numbered pages.
  173.    \evensidemargin   -5mm % rh  % Left margin on even-numbered pages.
  174. \else
  175.    \oddsidemargin     5mm % rh  % Left margin on odd-numbered pages.
  176.    \evensidemargin    5mm % rh  % Left margin on even-numbered pages.
  177. \fi
  178.  
  179. % VERTICAL SPACING:
  180. %                               % Top of page:
  181. \topmargin           -5mm % rh  %   Nominal distance from top of page to
  182.                                 %   top of box containing running head.
  183. \headheight           5mm % rh  %   Height of box containing running head.
  184. \headsep             10mm % rh  %   Space between running head and text.
  185. \topskip              4mm % rh  %   '\baselineskip' for first line of page.
  186.                                 % Bottom of page:
  187. \footheight           5mm % rh  %   Height of box containing running foot.
  188. \footskip            10mm % rh  %   Distance from baseline of box containing
  189.                                 %   foot to baseline of last line of text.
  190. % DIMENSION OF TEXT:
  191. %
  192. \textheight         225mm % rh  % Height of text (including footnotes and
  193.                                 % figures, excluding running head and foot).
  194. \textwidth          150mm % rh  % Width of text line.
  195.                                 % For two-column mode:
  196. \columnsep            1em % rh  %    Space between columns
  197. \columnseprule        0mm % rh  %    Width of rule between columns.
  198.  
  199. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  200. % natural height instead of being stretched to exactly \textheight.
  201. % FOOTNOTES:
  202. %
  203. \footnotesep          3mm % rh  % Height of strut placed at the beginning of
  204.                                 % every footnote = height of normal
  205.                                 % \footnotesize strut, so no extra space
  206.                                 % between footnotes.
  207. \skip\footins 4mm plus .4em minus .2em    % Space between last line of text
  208.                                           % text and top of first footnote.
  209.  
  210. %  ****************************************
  211. %  *                FLOATS                *
  212. %  ****************************************
  213. %
  214. % FLOATS: (a float is something like a figure or table)
  215. %
  216. %  FOR FLOATS ON A TEXT PAGE:
  217. %
  218. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  219. %
  220. \floatsep   1.2em plus .2em minus .2em  % Space between adjacent floats moved
  221.                                         % to top or bottom of text page.
  222. \intextsep  1.2em plus .2em minus .2em  % Space between in-text figures and
  223.                                         % text.
  224. \textfloatsep 2em plus .2em minus .4em  % Space between main text and floats
  225.                                         % at top or bottom of page.
  226. \@maxsep      2em                       % The maximum of \floatsep,
  227.                                         % \textfloatsep and \intextsep (minus
  228.                                         % the stretch and shrink).
  229.  
  230. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  231. %
  232. \dblfloatsep   1.2em plus .2em minus .2em % Same as \floatsep for double-column
  233.                                           % figures in two-column mode.
  234. \dbltextfloatsep 2em plus .2em minus .4em % \textfloatsep for double-column
  235.                                           % floats.
  236. \@dblmaxsep      2em                      % The maximum of \dblfloatsep and
  237.                                           % \dbltexfloatsep.
  238.  
  239. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  240. %
  241. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  242. %
  243. \@fptop  0em plus 1fil          % Stretch at top of float page/column.
  244.                                 % (Must be 0em plus ...)
  245. \@fpbot  0em plus 1fil          % Stretch at bottom of float page/column.
  246.                                 % (Must be 0em plus ... )
  247. \@fpsep .8em plus 2fil          % Space between floats on float page/column.
  248.  
  249. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  250. %
  251. \@dblfptop  0em plus 1fil       % Stretch at top of float page.
  252.                                 % (Must be 0em plus ...)
  253. \@dblfpbot  0em plus 1fil       % Stretch at bottom of float page.
  254.                                 % (Must be 0em plus ...)
  255. \@dblfpsep .8em plus 2fil       % Space between floats on float page.
  256.  
  257. % MARGINAL NOTES:
  258. %
  259. \marginparwidth      20mm % rh  % Width of marginal notes.
  260. \marginparsep        .5em % rh  % Horizontal space between outer margin
  261.                                 % and marginal note
  262. \marginparpush       .5em       % Minimum vertical separation between two
  263.                                 % marginal notes.
  264.  
  265. %  ****************************************
  266. %  *           PARAGRAPHING               *
  267. %  ****************************************
  268. %
  269. \parindent   0em                        % Width of paragraph indentation.
  270. \parskip    .8em plus .2em minus .2em   % Extra vertical space between
  271.                                         % paragraphs.
  272. \topsep     .4em plus .2em minus .1em   % Extra vertical space, in addition to
  273.                                         % \parskip, added above and below list
  274.                                         % and paragraphing environments.
  275. \partopsep  .2em plus .1em minus .1em   % Extra vertical space, in addition to
  276.                                         % \parskip and \topsep, added when
  277.                                         % user leaves blank line before the
  278.                                         % environment.
  279. \itemsep    .2em plus .1em minus .1em   % Extra vertical space, in addition to
  280.                                         % \parskip, added between list items.
  281. \newskip    \tocparskip
  282. \tocparskip .4em plus .2em minus .1em   % Extra vertical space between lines
  283.                                         % in the content tables
  284.  
  285. %  ****************************************
  286. %  *              PENALTIES               *
  287. %  ****************************************
  288. %
  289. % The following page-breaking penalties are defined
  290. %
  291. \@lowpenalty   51       % Produced by \nopagebreak[1] or \nolinebreak[1]
  292. \@medpenalty  151       % Produced by \nopagebreak[2] or \nolinebreak[2]
  293. \@highpenalty 301       % Produced by \nopagebreak[3] or \nolinebreak[3]
  294. \@beginparpenalty -\@lowpenalty % Before a list or paragraph environment.
  295. \@endparpenalty   -\@lowpenalty % After a list or paragraph environment.
  296. \@itempenalty     -\@lowpenalty % Between list items.
  297. % \clubpenalty                  % 'Club line'  at bottom of page.
  298. % \widowpenalty                 % 'Widow line' at top of page.
  299. % \displaywidowpenalty          % Math display widow line.
  300. % \predisplaypenalty            % Breaking before a math display.
  301. % \postdisplaypenalty           % Breaking after a math display.
  302. % \interlinepenalty             % Breaking at a line within a paragraph.
  303. % \brokenpenalty                % Breaking after a hyphenated line.
  304.  
  305. %    ****************************************
  306. %    *     PARTS, CHAPTERS AND SECTIONS     *
  307. %    ****************************************
  308. %
  309. % \secdef{UNSTARCMDS}{STARCMDS} :
  310. %    When defining a \chapter or \section command without using
  311. %    \@startsection, you can use \secdef as follows:
  312. %       \def\chapter { ... \secdef \CMDA \CMDB }
  313. %       \def\CMDA    [#1]#2{ ... }  % Command to define \chapter[...]{...}
  314. %       \def\CMDB    #1{ ... }      % Command to define \chapter*{...}
  315. %
  316. % The value of the counter secnumdepth gives the depth of the
  317. % highest-level sectioning command that is to produce section numbers.
  318. %
  319. \setcounter{secnumdepth}{3}
  320. \def\part{
  321.     \cleardoublepage            % Starts new page.
  322.     \thispagestyle{usplain}     % rh Page style of part page is 'usplain'
  323.     \if@twocolumn               % IF two-column style THEN
  324.        \onecolumn               %   \onecolumn
  325.        \@tempswatrue            %   @tempswa := true
  326.     \else                       % ELSE
  327.        \@tempswafalse           %   @tempswa := false
  328.     \fi                         % FI
  329.     \hbox{} \vfil               % Add fil glue to center title
  330.     \bgroup \centering          % BEGIN centering
  331.     \secdef\@part\@spart}
  332.  
  333. \def\@part[#1]#2{
  334.     \ifnum \c@secnumdepth >-2\relax     % IF secnumdepth > -2 THEN
  335.        \refstepcounter{part}            %   step part counter
  336.        \addcontentsline{toc}{part}      %   add toc numbered line
  337.        {\protect\numberline{\thepart}{#1}}
  338.        \LARGE\bf\@headpart\ \thepart    %   Print 'Part' and number
  339.        \par                             %   in \LARGE bold.
  340.        \vskip 2em                       %   Add space before title.
  341.     \else                               % ELSE
  342.        \addcontentsline{toc}{part}{#1}  %   add toc unnumbered line
  343.     \fi                                 % FI
  344.     \markboth{}{}
  345.     \huge \bf #1\@endpart               % Print Title in \huge bold.
  346.     \addtocontents{lof}{\protect\addvspace{4\parskip}}  % rh
  347.     \addtocontents{lot}{\protect\addvspace{4\parskip}}} % rh
  348.  
  349. \def\@spart#1{
  350.     \huge \bf #1\@endpart}              % Print title in \huge boldface
  351.  
  352. % \@endpart finishes the part page
  353. %
  354. \def\@endpart{
  355.     \par\egroup                         % END centering
  356.     \vfil\newpage                       % End page with 1fil glue.
  357.     \if@twoside                         % IF twoside printing THEN
  358.        \hbox{}                          %   Produce totally blank page
  359.        \thispagestyle{empty}
  360.        \newpage
  361.     \fi                                 % FI
  362.     \if@tempswa                         % IF @tempswa = true THEN
  363.        \twocolumn                       %   \twocolumn
  364.     \fi}                                % FI
  365.  
  366. \def\chapter{
  367.     \cleardoublepage            % Starts new right-hand page.
  368.     \thispagestyle{usplain}     % rh Page style of chapter page is 'usplain'
  369.     \global\@topnum\z@          % Prevents figures from going at top of page.
  370.     \@afterindentfalse          % Suppresses indent in first paragraph.
  371.     \secdef\@chapter\@schapter} % Change to \@afterindenttrue to have indent.
  372.  
  373. \def\@chapter[#1]#2{
  374.     \ifnum \c@secnumdepth >\m@ne                % IF secnumdepth > -2 THEN
  375.        \refstepcounter{chapter}                 %   step chapter counter
  376.        \typeout{\@chapapp\space\thechapter.}    %
  377.        \addcontentsline{toc}{chapter}           %   add toc numbered line
  378.        {\protect\numberline{\thechapter}{#1}}
  379.     \else                                       % ELSE
  380.       \addcontentsline{toc}{chapter}{#1}        %   add toc unnumbered line
  381.     \fi                                         % FI
  382.     \chaptermark{#1}
  383.     \if@twocolumn                               % Tests for two-column mode.
  384.        \@topnewpage[\@makechapterhead{#2}]
  385.     \else
  386.        \@makechapterhead{#2}
  387.        \@afterheading                           % Routine called after
  388.                                                 % chapter and section
  389.                                                 % heading.
  390.     \fi
  391.     \addtocontents{lof}{\protect\addvspace{2\parskip}} % Adds between-chapter
  392.     \addtocontents{lot}{\protect\addvspace{2\parskip}}}% space to lists of
  393.                                                        % figs & tables.
  394.  
  395. \def\@schapter#1{
  396.     \if@twocolumn
  397.        \@topnewpage[\@makeschapterhead{#1}]
  398.     \else
  399.        \@makeschapterhead{#1}
  400.        \@afterheading
  401.     \fi}
  402.  
  403. % \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
  404. %
  405. \def\@makechapterhead#1{                % Heading for \chapter command
  406.     \vspace{40pt}
  407.     { \Large \bf
  408.       \parindent  \z@
  409.       \hangindent \@pnumwidth
  410.       \makebox[\hangindent][l]{\thechapter}#1\par}
  411.     \nobreak
  412.     \vspace{25pt}}
  413.  
  414. % \@makeschapterhead {TEXT} : Makes the heading for the \chapter* command.
  415. %
  416. \def\@makeschapterhead#1{               % Heading for \chapter* command
  417.     \vspace{40pt}
  418.     { \Large \bf
  419.       \parindent  \z@
  420.       #1\par}
  421.     \nobreak
  422.     \vspace{25pt}}
  423.  
  424. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
  425. %            optional * [ALTHEADING]{HEADING}
  426. %    Generic command to start a section.
  427. %    NAME       : e.g., 'subsection'
  428. %    LEVEL      : a number, denoting depth of section -- e.g., chapter=1,
  429. %                 section = 2, etc.  A section number will be printed if
  430. %                 and only if LEVEL < or = the value of the secnumdepth
  431. %                 counter.
  432. %    INDENT     : Indentation of heading from left margin
  433. %    BEFORESKIP : Absolute value = skip to leave above the heading.
  434. %                 If negative, then paragraph indent of text following
  435. %                 heading is suppressed.
  436. %    AFTERSKIP  : if positive, then skip to leave below heading,
  437. %                       else - skip to leave to right of run-in heading.
  438. %    STYLE      : commands to set style
  439. %  If '*' missing, then increments the counter.  If it is present, then
  440. %  there should be no [ALTHEADING] argument.  A sectioning command
  441. %  is normally defined to \@startsection + its first six arguments.
  442. %
  443. \def\section{\@startsection {section}{1}{\z@}
  444.     {-3.5ex plus -1ex minus  -.2ex}
  445.     {2.3ex plus .2ex}{\large\bf}}
  446. \def\subsection{\@startsection {subsection}{2}{\z@}
  447.     {-3.25ex plus -1ex minus -.2ex}
  448.     {1.5ex plus .2ex}{\normalsize\bf}}
  449. \def\subsubsection{\@startsection {subsubsection}{3}{\z@}
  450.     {-3.25ex plus -1ex minus -.2ex}
  451.     {1.5ex plus .2ex}{\normalsize\bf}}
  452. \def\paragraph{\@startsection {paragraph}{4}{\z@}
  453.     {3.25ex plus 1ex minus .2ex}
  454.     {-1em}{\normalsize\bf}}
  455. \def\subparagraph{\@startsection {subparagraph}{4}{\parindent}
  456.     {3.25ex plus 1ex minus .2ex}
  457.     {-1em}{\normalsize\bf}}
  458.  
  459. % Default initializations of \...mark commands.  (See below for their
  460. % use in defining page styles.
  461. %
  462. \def\chaptermark#1{}
  463. % \def\sectionmark#1{}           % Preloaded definitions
  464. % \def\subsectionmark#1{}
  465. % \def\subsubsectionmark#1{}
  466. % \def\paragraphmark#1{}
  467. % \def\subparagraphmark#1{}
  468.  
  469. %    ****************************************
  470. %    *          DOCUMENT-SECTIONS           *
  471. %    ****************************************
  472. %
  473. % FRONT % rh
  474. %
  475. % The \front command must do the following:
  476. %    -- begin a new page
  477. %    -- set \@chapapp empty (for messages)
  478. %    -- set the page counter to one
  479. %    -- reset the chapter counter to zero
  480. %    -- reset the section counter to zero
  481. %    -- redefine the page counter to produce roman numbers
  482. %
  483. \def\front{
  484.     \clearpage
  485.     \def\@chapapp{}
  486.     \setcounter{page}{1}
  487.     \setcounter{chapter}{0}
  488.     \setcounter{section}{0}
  489.     \setcounter{footnote}{0}
  490.     \def\thepage{\Roman{page}}}
  491.  
  492. % BODY % rh
  493. %
  494. % The \body command must do the following:
  495. %    -- begin a new page
  496. %    -- set \@chapapp empty (for messages)
  497. %    -- reset the page counter to one
  498. %    -- reset the chapter counter to zero
  499. %    -- reset the section counter to zero
  500. %    -- redefine the page counter to produce arabic numbers
  501. %    -- redefine the chapter counter to produce arabic numbers
  502. %
  503. \def\body{
  504.     \clearpage
  505.     \def\@chapapp{\@headchapter}
  506.     \setcounter{page}{1}
  507.     \setcounter{chapter}{0}
  508.     \setcounter{section}{0}
  509.     \def\thepage{\arabic{page}}
  510.     \def\thechapter{\arabic{chapter}}}
  511.  
  512. % APPENDIX
  513. %
  514. % The \appendix command must do the following:
  515. %    -- begin a new unnumbered part
  516. %    -- set \@chapapp to Appendix (for messages)
  517. %    -- reset the chapter counter to zero
  518. %    -- redefine the chapter counter to produce appendix numbers
  519. %    -- reset the section counter to zero
  520. %
  521. \def\appendix{
  522.     \part*{\@headappendix}
  523.     \def\@chapapp{\@headappendix}
  524.     \setcounter{chapter}{0}
  525.     \setcounter{section}{0}
  526.     \def\thechapter{\Alph{chapter}}
  527.     \addtocontents{toc}{\protect\addvspace{4\parskip}}}
  528.     \addtocontents{lof}{\protect\addvspace{4\parskip}}
  529.     \addtocontents{lot}{\protect\addvspace{4\parskip}}
  530.  
  531. %    ****************************************
  532. %    * PART, CHAPTER AND SECTION NUMBERING  *
  533. %    ****************************************
  534. %
  535. % DEFINE COUNTERS:
  536. %
  537. % \newcounter{NEWCTR}[OLDCTR] : Defines NEWCTR to be a counter, which is
  538. %                               reset to zero when counter OLDCTR is stepped.
  539. %                               Counter OLDCTR must already be defined.
  540. %
  541. \newcounter {part}
  542. \newcounter {chapter}
  543. \newcounter {section}[chapter]
  544. \newcounter {subsection}[section]
  545. \newcounter {subsubsection}[subsection]
  546. \newcounter {paragraph}[subsubsection]
  547. \newcounter {subparagraph}[paragraph]
  548.  
  549. % For any counter CTR, \theCTR is a macro that defines the printed version
  550. % of counter CTR.  It is defined in terms of the following macros:
  551. %
  552. %  \arabic{COUNTER} : The value of COUNTER printed as an arabic numeral.
  553. %  \roman{COUNTER}  : Its value printed as a lower-case roman numberal.
  554. %  \Roman{COUNTER}  : Its value printed as an upper-case roman numberal.
  555. %  \alph{COUNTER}   : Value of COUNTER printed as a lower-case letter:
  556. %                         1 = a, 2 = b, etc.
  557. %  \Alph{COUNTER}   : Value of COUNTER printed as an upper-case letter:
  558. %                           1 = A, 2 = B, etc.
  559. %
  560. \def\thepart          {\Roman{part}}
  561. \def\thechapter       {\arabic{chapter}}
  562. \def\thesection       {\thechapter.\arabic{section}}
  563. \def\thesubsection    {\thesection.\arabic{subsection}}
  564. \def\thesubsubsection {\thesubsection .\arabic{subsubsection}}
  565. \def\theparagraph     {\thesubsubsection.\arabic{paragraph}}
  566. \def\thesubparagraph  {\theparagraph.\arabic{subparagraph}}
  567.  
  568. % \@chapapp is initially defined to be 'Chapter'.  The \appendix
  569. % command redefines it to be 'Appendix'.
  570. %
  571. \def\@chapapp{\@headchapter}
  572.  
  573. %    ****************************************
  574. %    *         TABLE OF CONTENTS, ETC.      *
  575. %    ****************************************
  576. %
  577. % A \subsection command writes a
  578. %       \contentsline{subsection}{TITLE}{PAGE}
  579. % command on the .toc file, where TITLE contains the contents of the
  580. % entry and PAGE is the page number.  If subsections are being numbered,
  581. % then TITLE will be of the form
  582. %       \numberline{NUM}{HEADING}
  583. % where NUM is the number produced by \thesubsection.  Other sectioning
  584. % commands work similarly.
  585. %
  586. % A \caption command in a 'figure' environment writes
  587. %    \contentsline{figure}{\numberline{NUM}{CAPTION}}{PAGE}
  588. % on the .lof file, where NUM is the number produced by \thefigure and
  589. % CAPTION is the figure caption.  It works similarly for a 'table' environment.
  590. %
  591. % The command \contentsline{NAME} expands to \l@NAME.  So, to specify
  592. % the table of contents, we must define \l@chapter, \l@section,
  593. % \l@subsection, ... ; to specify the list of figures, we must define
  594. % \l@figure; and so on.  Most of these can be defined with the
  595. % \@dottedtocline command, which works as follows.
  596. %
  597. % \@dottedtocline{LEVEL}{INDENT}{NUMWIDTH}{TITLE}{PAGE}
  598. %    LEVEL    : An entry is produced only if LEVEL < or = value of
  599. %               'tocdepth' counter.  Note, \chapter is level 0, \section
  600. %               is level 1, etc.
  601. %    INDENT   : The indentation from the outer left margin of the start of
  602. %               the contents line.
  603. %    NUMWIDTH : The width of a box in which the section number is to go,
  604. %               if TITLE includes a \numberline command.
  605. %
  606. % This command uses the following three parameters, which are set
  607. % with a \def (so em's can be used to make them depend upon the font).
  608. %   \@pnumwidth : The width of a box in which the page number is put.
  609. %   \@tocrmarg  : The right margin for multiple line entries.  One
  610. %                 wants \@tocrmarg > or = \@pnumwidth
  611. %   \@dotsep    : Separation between dots, in mu units.  Should be \def'd to
  612. %                 a number like 2 or 1.7
  613. %
  614. % TABLEOFCONTENTS
  615. %  In report style, \tableofcontents, \listoffigures, etc. are always
  616. %  set in single-column style.  @restonecol
  617. %
  618. \def\tableofcontents{
  619.     \@restonecolfalse
  620.     \if@twocolumn
  621.        \@restonecoltrue
  622.        \onecolumn
  623.     \fi
  624.     \chapter*{\@headtoc
  625.     \@mkboth{\uppercase{\@headtoc}}
  626.             {\uppercase{\@headtoc}}}
  627.     {\parskip \tocparskip \@starttoc{toc}}
  628.     \if@restonecol
  629.        \twocolumn
  630.     \fi}
  631.  
  632. %    ****************************************
  633. %    *       TABLE OF CONTENTS ENTRIES      *
  634. %    ****************************************
  635. %
  636. \setcounter{tocdepth}{3}
  637. \def\@dotsep         {4.5}
  638. \def\@tocrmarg       {2.55em}
  639. \def\@pnumwidth      {1.55em}
  640.  
  641. \def\l@part#1#2{
  642.     \addpenalty{-\@highpenalty}
  643.     \addvspace{4\parskip}
  644.     \begingroup
  645.        { \large\bf
  646.          \parindent    \z@
  647.          \@tempdima    \@pnumwidth
  648.          \rightskip    \@tocrmarg
  649.          \parfillskip -\@tocrmarg
  650.          \leavevmode #1\hfill#2\par}
  651.        \nobreak
  652.     \endgroup}
  653.  
  654. \def\l@chapter#1#2{
  655.     \pagebreak [3]
  656.     \addvspace{2\parskip}
  657.     \begingroup
  658.        { \bf
  659.          \parindent    \z@
  660.          \@tempdima    \@pnumwidth
  661.          \rightskip    \@tocrmarg
  662.          \parfillskip -\@tocrmarg
  663.          \leavevmode #1\hfill#2\par}
  664.     \endgroup}
  665.  
  666. \def\l@section       {\@dottedtocline{1} {\@pnumwidth} {2.3em}}
  667. \def\l@subsection    {\@dottedtocline{2} {3.8em}       {3.2em}}
  668. \def\l@subsubsection {\@dottedtocline{3} {7.0em}       {4.1em}}
  669. \def\l@paragraph     {\@dottedtocline{4} {10em}        {5em}}
  670. \def\l@subparagraph  {\@dottedtocline{5} {12em}        {6em}}
  671.  
  672. %    ****************************************
  673. %    *           LIST OF FIGURES            *
  674. %    ****************************************
  675. %
  676. \def\listoffigures{
  677.     \@restonecolfalse
  678.     \if@twocolumn
  679.        \@restonecoltrue
  680.        \onecolumn
  681.     \fi
  682.     \chapter*{\@headlof
  683.     \@mkboth{\uppercase{\@headlof}}
  684.             {\uppercase{\@headlof}}}
  685.     {\parskip \tocparskip \@starttoc{lof}}
  686.     \if@restonecol
  687.        \twocolumn
  688.     \fi}
  689. \def\l@figure{\@dottedtocline{1}{\@pnumwidth}{2.3em}}
  690.  
  691. %    ****************************************
  692. %    *             LIST OF TABLES           *
  693. %    ****************************************
  694. %
  695. \def\listoftables{
  696.     \@restonecolfalse
  697.     \if@twocolumn
  698.        \@restonecoltrue
  699.        \onecolumn
  700.     \fi
  701.     \chapter*{\@headlot
  702.     \@mkboth{\uppercase{\@headlot}}
  703.             {\uppercase{\@headlot}}}
  704.     {\parskip \tocparskip \@starttoc{lot}}
  705.     \if@restonecol
  706.        \twocolumn
  707.     \fi}
  708. \let\l@table\l@figure
  709.  
  710. %    ****************************************
  711. %    *         LIST OF ABBREVIATIONS        *
  712. %    ****************************************
  713. %
  714. \def\listofabbrev{\@ifnextchar[{\@listofabbrev}{\@listofabbrev[MMMM]}}
  715. \def\@listofabbrev[#1]{
  716.     \@restonecolfalse
  717.     \if@twocolumn
  718.        \@restonecoltrue
  719.        \onecolumn
  720.     \fi
  721.     \chapter*{\@headloa
  722.     \@mkboth{\uppercase{\@headloa}}
  723.             {\uppercase{\@headloa}}}
  724.     \begin{list}{}{
  725.            \labelsep 1em
  726.            \settowidth\labelwidth{#1}
  727.            \leftmargin\labelwidth
  728.            \advance\leftmargin\labelsep}
  729.        {\parskip \tocparskip \@starttoc{loa}}
  730.        \item [~] ~ % Dummy
  731.     \end{list}
  732.     \if@restonecol \twocolumn \fi}
  733. \def\abbrev#1#2{\addtocontents{loa}{\protect{\item [#1] #2 }}}
  734.  
  735. \let\listofshortcuts=\listofabbrev
  736. \let\shortcut       =\abbrev
  737.  
  738. %    ****************************************
  739. %    *            LIST OF SYMBOLS           *
  740. %    ****************************************
  741. %
  742. \def\listofsymbols{\@ifnextchar[{\@listofsymbols}{\@listofsymbols[MMMM]}}
  743. \def\@listofsymbols[#1]{
  744.     \@restonecolfalse
  745.     \if@twocolumn
  746.        \@restonecoltrue
  747.         \onecolumn
  748.     \fi
  749.     \chapter*{\@headlos
  750.     \@mkboth{\uppercase{\@headlos}}
  751.             {\uppercase{\@headlos}}}
  752.     \begin{list}{}{
  753.            \settowidth\labelwidth{#1}
  754.            \labelsep 1em
  755.            \leftmargin\labelwidth
  756.            \advance\leftmargin\labelsep}
  757.        {\parskip \tocparskip \@starttoc{los}}
  758.        \item [~] ~ % Dummy
  759.     \end{list}
  760.     \if@restonecol \twocolumn \fi}
  761. \def\symbol#1#2{\addtocontents{los}{\protect{\item [#1] #2 }}}
  762.  
  763. %    ****************************************
  764. %    *                ABSTRACT              *
  765. %    ****************************************
  766. %
  767. \def\abstract{\@ifnextchar[{\@abstract}{\@abstract[d]}}
  768. \def\@abstract[#1]{\def\temp{#1}
  769.     \if \temp d \chapter*{\@headabstract                        % default
  770.                 \@mkboth{\uppercase{\@headabstract}}
  771.                         {\uppercase{\@headabstract}}} \fi
  772.     \if \temp g \chapter*{Zusammenfassung                       % german
  773.                 \@mkboth{ZUSAMMENFASSUNG}
  774.                         {ZUSAMMENFASSUNG}} \fi
  775.     \if \temp e \chapter*{Abstract                              % english
  776.                 \@mkboth{ABSTRACT}
  777.                         {ABSTRACT}} \fi}
  778. \def\endabstract{}
  779.  
  780. %    ****************************************
  781. %    *               PREFACE                *
  782. %    ****************************************
  783. %
  784. \def\preface{\chapter*{\@headpreface
  785.              \@mkboth{\uppercase{\@headpreface}}
  786.                      {\uppercase{\@headpreface}}}}
  787. \def\endpreface{}
  788.  
  789. %    ****************************************
  790. %    *             BIBLIOGRAPHY             *
  791. %    ****************************************
  792. %
  793. % The thebibliography environment executes the following commands:
  794. %
  795. %  \def\newblock{\hskip .11em plus .33em minus -.07em} --
  796. %      Defines the `closed' format, where the blocks (major units of
  797. %      information) of an entry run together.
  798. %
  799. %  \sloppy  -- Used because it's rather hard to do line breaks in
  800. %      bibliographies,
  801. %
  802. %  \sfcode`\.=1000\relax --
  803. %      Causes a `.' (period) not toproduce an end-of-sentence space.
  804. %
  805. \def\thebibliography#1{
  806.     \chapter*{\@headbib
  807.     \@mkboth{\uppercase{\@headbib}}
  808.             {\uppercase{\@headbib}}}
  809.     \def\newblock{\hskip .11em plus .33em minus -.07em}
  810.     \sfcode`\.=1000\relax
  811.     \sloppy
  812.     \list{[\arabic{enumi}]}{
  813.           \settowidth\labelwidth{[#1]}
  814.           \labelsep 1em
  815.           \leftmargin\labelwidth
  816.           \advance\leftmargin\labelsep
  817.           \usecounter{enumi}}}
  818. \let\endthebibliography=\endlist
  819.  
  820. % \def\@biblabel#1{[#1]\hfill}  % Produces the label for a \bibitem[...]
  821.                                 % command.
  822. % \def\@cite#1{[#1]}            % Produces the output of the \cite command.
  823.  
  824. %    ****************************************
  825. %    *              THE INDEX               *
  826. %    ****************************************
  827. %
  828. % THE THEINDEX ENVIRONMENT
  829. % Produces double column format, with each paragraph a separate entry.
  830. % The user commands \item, \subitem and \subsubitem are used to
  831. % produce the entries, and \indexspace adds an extra vertical space
  832. % that's the right size to put above the first entry with a new letter
  833. % of the alphabet.
  834. %
  835. \newif\if@restonecol
  836. \def\theindex{
  837.     \@restonecoltrue
  838.     \if@twocolumn
  839.        \@restonecolfalse
  840.     \fi
  841.     \columnseprule \z@
  842.     \columnsep 3.5em
  843.     \twocolumn
  844.     \chapter{\@headidx
  845.     \@mkboth{\uppercase{\@headidx}}
  846.             {\uppercase{\@headidx}}}
  847.     \thispagestyle{usplain} % rh
  848.     \parindent\z@
  849.     \parskip \z@ plus .03em
  850.     \relax
  851.     \let\item\@idxitem}
  852.  
  853. \def\endtheindex{
  854.     \if@restonecol
  855.        \onecolumn
  856.     \else
  857.        \clearpage
  858.     \fi}
  859.  
  860. \def\@idxitem{\par\hangindent 4em}
  861. \def\subitem{\par\hangindent 4em \hspace*{2em}}
  862. \def\subsubitem{\par\hangindent 4em \hspace*{3em}}
  863. \def\indexspace{\par \vskip 1em plus .5em minus .3em\relax}
  864.  
  865. %    ****************************************
  866. %    *                LISTS                 *
  867. %    ****************************************
  868. %
  869. % The following commands are used to set the default values for the list
  870. % environment's parameters. See the LaTeX manual for an explanation of
  871. % the meanings of the parameters.  Defaults for the list environment are
  872. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  873. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  874. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  875. % called for a third-level list.)  By convention, \@listK should set
  876. % \leftmargin to \leftmarginK.
  877. %
  878. % For efficiency, level-one list's values are defined at top level, and
  879. % \@listi is defined to set only \leftmargin.
  880. % In two-column format the indentations for level i, v and vi are smaller
  881. % than in one-column format.
  882. %
  883. \if@twocolumn
  884.    \leftmargini      2em
  885.    \leftmarginii   2.2em   % > \labelsep + width of '(m)'
  886.    \leftmarginiii  1.87em  % > \labelsep + width of 'vii.'
  887.    \leftmarginiv   1.7em   % > \labelsep + width of 'M.'
  888.    \leftmarginv    0.5em
  889.    \leftmarginvi   0.5em
  890. \else
  891.    \leftmargini    2.5em
  892.    \leftmarginii   2.2em   % > \labelsep + width of '(m)'
  893.    \leftmarginiii  1.87em  % > \labelsep + width of 'vii.'
  894.    \leftmarginiv   1.7em   % > \labelsep + width of 'M.'
  895.    \leftmarginv    1.0em
  896.    \leftmarginvi   1.0em
  897. \fi
  898.  
  899. \leftmargin\leftmargini
  900. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  901. \labelsep .5em
  902. \parsep .4em plus .2em minus .1em
  903.  
  904. \def\@listi{\leftmargin\leftmargini}
  905. \def\@listii{\leftmargin\leftmarginii
  906.     \labelwidth\leftmarginii
  907.     \advance\labelwidth-\labelsep
  908.     \topsep .4em plus .2em minus .1em
  909.     \parsep .2em plus .1em minus .1em
  910.     \itemsep \parsep}
  911. \def\@listiii{\leftmargin\leftmarginiii
  912.     \labelwidth\leftmarginiii
  913.     \advance\labelwidth-\labelsep
  914.     \topsep .2em plus .1em minus .1em
  915.     \parsep \z@
  916.     \partopsep .1em plus 0em minus .1em
  917.     \itemsep \topsep}
  918. \def\@listiv{\leftmargin\leftmarginiv
  919.     \labelwidth\leftmarginiv
  920.     \advance\labelwidth-\labelsep}
  921. \def\@listv{\leftmargin\leftmarginv
  922.     \labelwidth\leftmarginv
  923.     \advance\labelwidth-\labelsep}
  924. \def\@listvi{\leftmargin\leftmarginvi
  925.     \labelwidth\leftmarginvi
  926.     \advance\labelwidth-\labelsep}
  927.  
  928. %    ****************************************
  929. %    *           LIST ENVIRONMENTS          *
  930. %    ****************************************
  931. %
  932. % ENUMERATE
  933. %  Enumeration is done with four counters: enumi, enumii, enumiii
  934. %  and enumiv, where enumN controls the numbering of the Nth level
  935. %  enumeration.  The label is generated by the commands \labelenumi
  936. %  ... \labelenumiv.  The expansion of \p@enumN\theenumN defines the
  937. %  output of a \ref command.
  938. %
  939. \def\theenumi     {\arabic{enumi}}
  940. \def\theenumii    {\alph{enumii}}
  941. \def\theenumiii   {\roman{enumiii}}
  942. \def\theenumiv    {\Alph{enumiv}}
  943. \def\labelenumi   {\theenumi.}          % rh {\arabic{enumi}.}
  944. \def\labelenumii  {(\theenumii)}        % rh {(\alph{enumii})}
  945. \def\labelenumiii {\theenumiii.}        % rh {\roman{enumiii}.}
  946. \def\labelenumiv  {\theenumiv.}         % rh {\Alph{enumiv}.}
  947. \def\p@enumii     {\theenumi}
  948. \def\p@enumiii    {\theenumi(\theenumii)}
  949. \def\p@enumiv     {\p@enumiii\theenumiii}
  950.  
  951. % ITEMIZE
  952. % Itemization is controlled by four commands: \labelitemi, \labelitemii,
  953. % \labelitemiii, and \labelitemiv, which define the labels of the various
  954. % itemization levels.
  955. %
  956. \def\labelitemi   {$\bullet$}
  957. \def\labelitemii  {\bf --}
  958. \def\labelitemiii {$\circ$}
  959. \def\labelitemiv  {$\cdot$}
  960.  
  961. % VERSE
  962. %   The verse environment is defined by making clever use of the
  963. %   list environment's parameters.  The user types \\ to end a line.
  964. %   This is implemented by \let'in \\ equal \@centercr.
  965. %
  966. \def\verse{
  967.     \let\\=\@centercr
  968.     \list{}{\itemsep       \z@
  969.             \itemindent    -1.5em
  970.             \listparindent \itemindent
  971.             \rightmargin   \leftmargin
  972.             \advance\leftmargin 1.5em}
  973.     \item[]}
  974. \let\endverse\endlist
  975.  
  976. % QUOTATION
  977. %   Fills lines
  978. %   Indents paragraph
  979. %
  980. \def\quotation{
  981.     \list{}{\itemindent    1.5em
  982.             \listparindent \itemindent
  983.             \rightmargin   \leftmargin
  984.             \parsep 0em plus .1em}
  985.     \item[]}
  986. \let\endquotation=\endlist
  987.  
  988. % QUOTE -- same as quotation except no paragraph indentation,
  989. %
  990. \def\quote{
  991.     \list{}{\rightmargin\leftmargin}
  992.     \item[]}
  993. \let\endquote=\endlist
  994.  
  995. % DESCRIPTION
  996. %
  997. %  To change the formatting of the label, you must redefine
  998. %  \descriptionlabel.
  999. %
  1000. \def\descriptionlabel#1{\hspace\labelsep \bf #1}
  1001. \def\description{
  1002.     \list{}{\labelwidth    \z@
  1003.             \itemindent   -\leftmargin
  1004.             \let\makelabel \descriptionlabel}}
  1005. \let\enddescription\endlist
  1006. \newdimen\descriptionmargin
  1007. \descriptionmargin=3em
  1008.  
  1009.  
  1010. % DEFLIST
  1011. %
  1012. %\def\deflabel#1{\bf #1\hfill}
  1013. \def\deflabel#1{#1\hfill}
  1014. \def\deflist#1{
  1015. %    \list{}{\settowidth{\labelwidth}{\bf #1}
  1016.     \list{}{\settowidth{\labelwidth}{#1}
  1017.             \setlength{\leftmargin}{\labelwidth}
  1018.             \addtolength{\leftmargin}{\labelsep}
  1019.             \let\makelabel \deflabel}}
  1020. \let\enddeflist\endlist
  1021.  
  1022. %    ****************************************
  1023. %    *         OTHER ENVIRONMENTS           *
  1024. %    ****************************************
  1025. %
  1026. % THEOREM
  1027. %
  1028. % \@begintheorem ... \@endtheorem are the commands executed at the
  1029. % beginning and end of a (user-defined) theorem-like environment.
  1030. % Except \@opargbegintheorem is executed when an optional argument is
  1031. % given.  Cf. LATEX.TEX.
  1032. %
  1033. % \def\@begintheorem#1#2{
  1034. %     \it \trivlist \item[\hskip \labelsep{\bf #1\ #2}]}
  1035. % \def\@opargbegintheorem#1#2#3{
  1036. %     \it \trivlist \item[\hskip \labelsep{\bf #1\ #2\ (#3)}]}
  1037. % \def\@endtheorem{\endtrivlist}
  1038. % TITLEPAGE
  1039. %  In the normal environments, the titlepage environment does nothing but
  1040. %  start and end a page, and inhibit page numbers.  It also resets the
  1041. %  page number to zero.  In two-column style, it still makes a one-column
  1042. %  page.
  1043. %
  1044. \def\titlepage{
  1045.     \if@twocolumn
  1046.        \@restonecoltrue
  1047.        \onecolumn
  1048.     \else
  1049.        \@restonecolfalse
  1050.        \newpage
  1051.     \fi
  1052.     \thispagestyle{empty}
  1053.     \c@page\z@}
  1054.  
  1055. \def\endtitlepage{
  1056.     \if@restonecol
  1057.        \twocolumn
  1058.     \else
  1059.        \newpage
  1060.     \fi}
  1061.  
  1062. % ARRAY AND TABULAR
  1063. %
  1064. \arraycolsep    .5em  % Half the space between columns in array environment.
  1065. \tabcolsep      .6em  % Half the space between columns in tabular environment.
  1066. \arrayrulewidth .04em % Width of rules in array and tabular environment.
  1067. \doublerulesep  .2em  % Space between adjacent rules in array or tabular env.
  1068.  
  1069. % TABBING
  1070. %
  1071. \tabbingsep\labelsep % Space used by the \' command.  (See LaTeX manual.)
  1072.  
  1073. % MINIPAGE
  1074. %  \@minipagerestore is called upon entry to a minipage environment to
  1075. %  set up things that are to be handled differently inside a minipage
  1076. %  environment. In the current styles, it does nothing.
  1077. %
  1078. % \skip\@mpfootins : plays same role for footnotes in a minipage as
  1079. %                    \skip\footins does for ordinary footnotes
  1080. %
  1081. \skip\@mpfootins = \skip\footins
  1082.  
  1083. % FRAMEBOX
  1084. %
  1085. \fboxsep    .3em  % Space left between box and text by \fbox and \framebox.
  1086. \fboxrule   .04em % Width of rules in box made by \fbox and \framebox.
  1087.  
  1088. %    ****************************************
  1089. %    *             FOOTNOTES                *
  1090. %    ****************************************
  1091. %
  1092. % \footnoterule is a macro to draw the rule separating the footnotes from
  1093. % the text.  It should take zero vertical space, so it needs a negative
  1094. % skip to compensate for any positive space taken by the rule.  (See
  1095. % PLAIN.TEX.)
  1096. %
  1097. \def\footnoterule{
  1098.     \kern-3\p@
  1099.     \hrule width .4\columnwidth
  1100.     \kern 2.6\p@}               % The \hrule has default height of .04em .
  1101.  
  1102. % \newcounter{footnote}
  1103. \@addtoreset{footnote}{chapter}  % Numbers footnotes within chapters
  1104. %   \@makefntext{NOTE} :
  1105. %        Must produce the actual footnote, using \@thefnmark as the mark
  1106. %        of the footnote and NOTE as the text.  It is called when effectively
  1107. %        inside a \parbox of width \columnwidth (i.e., with \hsize =
  1108. %        \columnwidth).
  1109. %
  1110. %        The following macro indents all lines of the footnote by 1em, and
  1111. %        indents the first line of a new paragraph by 1em.  To change these
  1112. %        dimensions, just substitute the desired value for '10pt' [in both
  1113. %        places] or '1em'.  The mark is flushright against the footnote.
  1114. %          \long\def\@makefntext#1{\@setpar{\@@par\@tempdima \hsize
  1115. %             \advance\@tempdima-10pt\parshape \@ne 1em \@tempdima}\par
  1116. %             \parindent 1em\noindent \hbox to \z@{\hss$^{\@thefnmark}$}#1}
  1117. %
  1118. %        A simpler macro is used, in which the footnote text is
  1119. %        set like an ordinary text paragraph, with no indentation except
  1120. %        on the first line of a paragraph, and the first line of the
  1121. %        footnote.  Thus, all the macro must do is set \parindent
  1122. %        to the appropriate value for succeeding paragraphs and put the
  1123. %        proper indentation before mark.
  1124. \long\def\@makefntext#1{
  1125.      \parindent    0em
  1126.      \hangindent 1.8em
  1127.      \makebox[\hangindent][r]{$^{\@thefnmark}$}#1}
  1128. % \@makefnmark : A macro to generate the footnote marker that goes
  1129. %    in the text.  Default used.
  1130. %
  1131.  
  1132. %    ****************************************
  1133. %    *         FIGURES AND TABLES           *
  1134. %    ****************************************
  1135. %
  1136. % Float placement parameters.  See LaTeX manual for their definition.
  1137. %
  1138. %****
  1139. %\setcounter{topnumber}    {2}
  1140. \setcounter{topnumber}     {1}
  1141. %***
  1142. %\setcounter{bottomnumber} {1}
  1143. \setcounter{bottomnumber}  {2}
  1144. %***
  1145. \setcounter{totalnumber}  {3}
  1146. %***
  1147. \setcounter{dbltopnumber} {2}
  1148. %***
  1149. %\def\topfraction          {.7}
  1150. \def\topfraction          {.8}
  1151. %***
  1152. %\def\bottomfraction       {.3}
  1153. \def\bottomfraction       {.8}
  1154. %***
  1155. %\def\textfraction         {.2}
  1156. \def\textfraction         {.1}
  1157. %***
  1158. %\def\floatpagefraction    {.5}
  1159. \def\floatpagefraction    {.2}
  1160. %***
  1161. \def\dbltopfraction       {.7}
  1162. %***
  1163. \def\dblfloatpagefraction {.5}
  1164.  
  1165. % \@makecaption{NUMBER}{TEXT} : Macro to make a figure or table caption.
  1166. %      NUMBER : Figure or table number--e.g., 'Figure 3.2'
  1167. %      TEXT   : The caption text.
  1168. %  Macro should be called inside a \parbox of right width, with \normalsize.
  1169. %
  1170. \long\def\@makecaption#1#2{
  1171.      \vskip 1em
  1172.      \setbox\@tempboxa\hbox{{\normalsize \sf #1: #2}}
  1173.      \ifdim \wd\@tempboxa >\hsize   % IF longer than one line THEN
  1174.         \parindent    0em
  1175.         \settowidth{\hangindent}{{\normalsize \sf #1: }}
  1176.         \makebox[\hangindent][r]{{\normalsize \sf #1: }}{\normalsize \sf #2}
  1177. %       \unhbox\@tempboxa\par       %   set as ordinary paragraph.
  1178.      \else                          % ELSE
  1179.         \hbox to\hsize{\hfil\box\@tempboxa\hfil} % center.
  1180.      \fi}
  1181. % To define a float of type TYPE (e.g., TYPE = figure), the document style
  1182. % must define the following.
  1183. %
  1184. %  \fps@TYPE   : The default placement specifier for floats of type TYPE.
  1185. %
  1186. %  \ftype@TYPE : The type number for floats of type TYPE.  Each TYPE has
  1187. %                associated a unique positive TYPE NUMBER, which is a power
  1188. %                of two.  E.g., figures might have type number 1, tables type
  1189. %                number 2, programs type number 4, etc.
  1190. %
  1191. %  \ext@TYPE   : The file extension indicating the file on which the
  1192. %                contents list for float type TYPE is stored.  For example,
  1193. %                \ext@figure = 'lof'.
  1194. %
  1195. %  \fnum@TYPE  : A macro to generate the figure number for a caption.
  1196. %                For example, \fnum@TYPE == Figure \thefigure.
  1197. %
  1198. %  The actual float-making environment commands--e.g., the commands
  1199. %  \figure and \endfigure--are defined in terms of the macros \@float
  1200. %  and \end@float, which are described below.
  1201. %
  1202. %  \@float{TYPE}[PLACEMENT] : Macro to begin a float environment for a
  1203. %     single-column float of type TYPE with PLACEMENT as the placement
  1204. %     specifier.  The default value of PLACEMENT is defined by \fps@TYPE.
  1205. %     The environment is ended by \end@float.
  1206. %     E.g., \figure == \@float{figure}, \endfigure == \end@float.
  1207.  
  1208. % FIGURE
  1209. %
  1210. \newcounter{figure}[chapter]
  1211. \def\thefigure{\thechapter.\@arabic\c@figure}
  1212. \def\ext@figure{lof}
  1213. \def\ftype@figure{1}
  1214. \def\fps@figure{htbp}
  1215. \def\fnum@figure{{\sf \@capfigure\ \thefigure}}
  1216. \def\figure{\@float{figure}}
  1217. \let\endfigure\end@float
  1218. \@namedef{figure*}{\@dblfloat{figure}}
  1219. \@namedef{endfigure*}{\end@dblfloat}
  1220.  
  1221. % TABLE
  1222. %
  1223. \newcounter{table}[chapter]
  1224. \def\thetable{\thechapter.\@arabic\c@table}
  1225. \def\ext@table{lot}
  1226. \def\ftype@table{2}
  1227. \def\fps@table{htbp}
  1228. \def\fnum@table{\@captable\ \thetable}
  1229. \def\table{\@float{table}}
  1230. \let\endtable\end@float
  1231. \@namedef{table*}{\@dblfloat{table}}
  1232. \@namedef{endtable*}{\end@dblfloat}
  1233.  
  1234. %    ****************************************
  1235. %    *                TITLE                 *
  1236. %    ****************************************
  1237. %
  1238. % Uses same title and abstract format as the article style's
  1239. % titlepage option.
  1240. %
  1241. \def\maketitle{
  1242.     \begin{titlepage}
  1243.     \let\footnotesize\small     % Local definitions to make \thanks produce
  1244.     \let\footnoterule\relax     % \normalsize footnotes with no separating rule.
  1245.     \setcounter{page}{0}
  1246.     \null
  1247.     \vfil
  1248.     \vskip 6em                          % To adjust centering.
  1249.     \begin{center}
  1250.        {\LARGE\@title\par}              % Set title in \LARGE size.
  1251.        \vskip 3em                       % Vertical space after title.
  1252.        { \large                         % Set author in \large size.
  1253.          \lineskip .75em
  1254.          \begin{tabular}[t]{c}\@author
  1255.          \end{tabular}\par}
  1256.        \vskip 1.5em                     % Vertical space after author.
  1257.        {\large \@date \par}             % Set date in \large size.
  1258.     \end{center}\par
  1259.     \@thanks
  1260.    \vfil
  1261.    \null
  1262.    \end{titlepage}
  1263.    \setcounter{footnote}{0}             % Footnotes start at zero again.
  1264.    \let\thanks\relax
  1265.    \gdef\@thanks{}
  1266.    \gdef\@author{}
  1267.    \gdef\@title{}
  1268.    \let\maketitle\relax}
  1269.  
  1270. %    ****************************************
  1271. %    *            PAGE STYLES               *
  1272. %    ****************************************
  1273. %
  1274. % The page style 'foo' is defined by defining the command \ps@foo.  This
  1275. % command should make only local definitions.  There should be no stray
  1276. % spaces in the definition, since they could lead to mysterious extra
  1277. % spaces in the output.
  1278. %
  1279. % The \ps@... command defines the macros \@oddhead, \@oddfoot,
  1280. % \@evenhead, and \@evenfoot to define the running heads and
  1281. % feet---e.g., \@oddhead is the macro to produce the contents of the
  1282. % heading box for odd-numbered pages.  It is called inside an \hbox of
  1283. % width \textwidth.
  1284. %
  1285. % To make headings determined by the sectioning commands, the page style
  1286. % defines the commands \chaptermark, \sectionmark, ... , where
  1287. % \chaptermark{TEXT} is called by \chapter to set a mark, and so on.
  1288. % The \...mark commands and the \...head macros are defined with the
  1289. % help of the following macros.  (All the \...mark commands should be
  1290. % initialized to no-ops.)
  1291. %
  1292. % MARKING CONVENTIONS:
  1293. % LaTeX extends TeX's \mark facility by producing two kinds of marks
  1294. % a 'left' and a 'right' mark, using the following commands:
  1295. %     \markboth{LEFT}{RIGHT} : Adds both marks.
  1296. %     \markright{RIGHT}      : Adds a 'right' mark.
  1297. %     \leftmark  : Used in the \@oddhead, \@oddfoot, \@evenhead or \@evenfoot
  1298. %                  macro, gets the current 'left'  mark.  Works like TeX's
  1299. %                  \botmark command.
  1300. %     \rightmark : Used in the \@oddhead, \@oddfoot, \@evenhead or \@evenfoot
  1301. %                  macro, gets the current 'right'  mark.  Works like TeX's
  1302. %                  \firstmark command.
  1303. % The marking commands work reasonably well for right marks 'numbered
  1304. % within' left marks--e.g., the left mark is changed by a \chapter command and
  1305. % the right mark is changed by a \section command.  However, it does
  1306. % produce somewhat anomalous results if two \bothmark's occur on the same page.
  1307. %
  1308. % Commands like \tableofcontents that should set the marks in some page styles
  1309. % use a \@mkboth command, which is \let by the pagestyle command (\ps@...)
  1310. % to \markboth for setting the heading or \@gobbletwo to do nothing.
  1311. %
  1312. \mark{{}{}}   % Initializes TeX's marks
  1313. % \ps@empty and \ps@plain defined in LATEX.TEX
  1314.  
  1315. % Definition of 'headings' page style
  1316. %
  1317. %  Note the use of ##1 for parameter of \def\chaptermark inside the
  1318. %  \def\ps@headings.
  1319. %
  1320. \def\ps@headings{
  1321.     \let\@mkboth\markboth
  1322.     \def\@evenhead{\rm\thepage\hfil \sl\leftmark\hbox{}}% Left heading.
  1323.     \def\@oddhead{\hbox{}\sl\rightmark \hfil\rm\thepage}% Right heading.
  1324.     \def\@oddfoot{}
  1325.     \def\@evenfoot{}
  1326.     \def\chaptermark##1{
  1327.         \markboth{\uppercase{\ifnum \c@secnumdepth >\m@ne
  1328.                                 \@chapapp\ \thechapter. \
  1329.                              \fi ##1}}{}}%
  1330.     \def\sectionmark##1{\markright{\uppercase{ \ifnum \c@secnumdepth >\z@
  1331.                                                   \thesection. \
  1332.                                                \fi ##1}}}}
  1333. % Definition of 'myheadings' page style.
  1334. %
  1335. \def\ps@myheadings{
  1336.     \let\@mkboth\@gobbletwo
  1337.     \def\@oddhead{\hbox{}\sl\rightmark \hfil\rm\thepage}
  1338.     \def\@evenhead{\rm\thepage\hfil \sl\leftmark\hbox{}}
  1339.     \def\@oddfoot{}
  1340.     \def\@evenfoot{}
  1341.     \def\sectionmark##1{}
  1342.     \def\subsectionmark##1{}}
  1343. % Definition of 'usplain' page style.
  1344. %
  1345. \def\ps@usplain{
  1346.     \let\@mkboth\@gobbletwo
  1347.     \def\@oddhead {\hfil \thepage \hfil }
  1348.     \def\@evenhead{\hfil \thepage \hfil }
  1349.     \def\@oddfoot{}
  1350.     \def\@evenfoot{}
  1351.     \def\sectionmark##1{}
  1352.     \def\subsectionmark##1{}}
  1353.  
  1354. %    ****************************************
  1355. %    *            MISCELLANEOUS             *
  1356. %    ****************************************
  1357. %
  1358. % EQUATION and EQNARRAY -- put here because it must follow \chapter definition
  1359. %
  1360. % \newcounter{equation}
  1361. %
  1362. \@addtoreset{equation}{chapter}   % Makes \chapter reset 'equation' counter.
  1363. \def\theequation{\thechapter.\arabic{equation}}
  1364.  
  1365. % \jot = 0.3em     % Extra space added between lines of an eqnarray environment
  1366. % The macro \@eqnnum defines how equation numbers are to appear in equations.
  1367. %
  1368. % \def\@eqnnum{(\theequation)}
  1369. %
  1370. \def\bs{$\backslash$}
  1371. \let\3\ss
  1372.  
  1373. %    ****************************************
  1374. %    *           INITIALIZATION             *
  1375. %    ****************************************
  1376. %
  1377. % Default initializations
  1378. %
  1379. \if@twocolumn \twocolumn \sloppy % Two-column.
  1380. \else         \onecolumn \fussy  % Single-column.
  1381. \fi
  1382. \pagenumbering{arabic}           % Arabic page numbers
  1383. \pagestyle{usplain}              % `usplain' page style
  1384. \makeatother                     % re-make at a special character
  1385.